var pageii = null;
var grid = null;
$(function() {
	grid = lyGrid({
		pagId : 'paging1',
		l_column : [{
			colkey : "food",
			name : "食品名称"
		},{
			colkey : "w_name",
			name : "窗口名称"
		},{
			colkey : "c_name",
			name : "窗口承包商"
		},{
			colkey : "timeDescs",
			name : "时间"
		},{
			colkey : "totalprofit",
			name : "总利润"
		},{
			colkey : "saletotal",
			name : "总销售额"
		}],
		jsonUrl : rootPath + '/cbs/findckProfitByPage.shtml',
		checkbox : true,
		serNumber : true
	});
	$("#mmsearch").click("click", function() {// 绑定查询按扭
		alert(1);
		var searchParams = $("#mmsearchForm").serializeJson();// 初始化传参数
		alert(searchParams);
		grid.setOptions({
			data : searchParams
		});
	});
	
	$("#begintime").on("click",function(e){
		e.stopPropagation();
		$(this).lqdatetimepicker({
			css : 'datetime-day',
			dateType : 'D',
			selectback : function(){
			}
		});
	});
	
	$("#endtime").on("click",function(e){
		e.stopPropagation();
		$(this).lqdatetimepicker({
			css : 'datetime-day',
			dateType : 'D',
			selectback : function(){
			}
		});
	});
	
});
function wwid(){
	alert("wwid");
	var searchParams2 = $("#mmsearchForm").serializeJson();// 初始化传参数
	alert(searchParams2);
	grid.setOptions({
		data : searchParams2,
		jsonUrl : rootPath + '/cbs/findckProfitByPage.shtml'
	});
}